%%
%% This is file `scnuthesis.cls',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% scnuthesis.dtx  (with options: `cls')
%% 
%% !Mode:: "TeX:UTF-8"
%% 
%% This is a generated file.
%% 
%% Copyright (C) 2024 by Joseph Pan <cs.wzpan@gmail.com>
%% 
%% This file may be distributed and/or modified under the
%% conditions of the LaTeX Project Public License, either version 1.3a
%% of this license or (at your option) any later version.
%% The latest version of this license is in:
%% 
%% http://www.latex-project.org/lppl.txt
%% 
%% and version 1.3a or later is part of all distributions of LaTeX
%% version 2004/10/01 or later.
%% 
%% To produce the documentation run the original source files ending with `.dtx'
%% through LaTeX.
%% 
%% Any Suggestions : Joseph Pan <cs.wzpan@gmail.com>
%% Thanks LiuBenYuan <liubenyuan@gmail.com> for the nudtpapre class!
%% Thanks Xue Ruini <xueruini@gmail.com> for the thuthesis class!
%% Thanks sofoot for the original NUDT paper class!
%% 
\NeedsTeXFormat{LaTeX2e}[1999/12/01]
\ProvidesClass{scnuthesis}

\newif\ifismaster\ismastertrue
\newif\ifisttf\isttftrue
\DeclareOption{master}{\ismastertrue}
\DeclareOption{doctor}{\ismasterfalse}
\newif\ifisanon\isanonfalse
\DeclareOption{anon}{\isanontrue}
\newif\ifistwoside\istwosidefalse
\DeclareOption{twoside}{\istwosidetrue}
\DeclareOption{ttf}{\isttftrue}
\DeclareOption{otf}{\isttffalse}
\newif\ifisvista\isvistafalse
\DeclareOption{vista}{\isvistatrue}
\newif\ifischapter\ischapterfalse
\DeclareOption{chapterhead}{\ischaptertrue}
\DeclareOption*{\PackageWarning{scnuthesis}{Unknown Option '\CurrentOption'}}
\ProcessOptions\relax
\def\zhdigits#1{%
  \@tfor\next:=#1\do{%
    \ifcase\next
      〇\or 一\or 二\or 三\or 四\or 五\or 六\or 七\or 八\or 九%
    \fi}}
\def\zhdigitx#1{%
  \edef\next{#1}%
  \expandafter\zhdigits\expandafter{\next}}
\RequirePackage{ifthen,calc}
\RequirePackage{tikz}
\RequirePackage[normalem]{ulem}
\ifistwoside
  \LoadClass[a4paper,12pt,openright,twoside]{book}
\else
  \LoadClass[a4paper,12pt,openany]{book}
  \fi
\RequirePackage[includeheadfoot]{geometry}
\RequirePackage[center,pagestyles]{titlesec}
\RequirePackage{titletoc}
\RequirePackage{graphicx}
\RequirePackage[config]{subfig}
\RequirePackage{float}
\RequirePackage{array}
\RequirePackage{longtable}
\RequirePackage{booktabs}
\RequirePackage{multirow}
\RequirePackage{tabularx}
\RequirePackage{diagbox}
\RequirePackage[neverdecrease]{paralist}
\RequirePackage{xcolor}
\RequirePackage{amsmath,amssymb,bm}
\RequirePackage[varg]{txfonts}
\RequirePackage[amsmath,thmmarks,hyperref]{ntheorem}
\RequirePackage[CJKnumber,no-math,BoldFont,SlantFont]{xeCJK}
\punctstyle{hangmobanjiao}
\RequirePackage{ulem}
\RequirePackage{indentfirst}
\RequirePackage{setspace}
\RequirePackage[numbers,sort&compress,square]{natbib}
\RequirePackage[CJKbookmarks=true,pdfborder=0 0 1]{hyperref}
\defaultfontfeatures{Mapping=tex-text}
\xeCJKsetcharclass{"0}{"2E7F}{0}
\xeCJKsetcharclass{"2E80}{"FFFF}{1}
\newcommand\installTTF{%
  \setmainfont{Times New Roman}
  \setsansfont{Arial}
  \setmonofont{Courier New}
  \ifisvista
    \setCJKmainfont[BoldFont={SimHei},ItalicFont={KaiTi}]{SimSun}
    \setCJKmonofont{KaiTi} % Pluto use LiSu Thu use Kaiti, orig is SimSun
    \setCJKfamilyfont{fs}{FangSong}
    \setCJKfamilyfont{kai}{KaiTi}
  \else
    \setCJKmainfont[BoldFont={SimHei},ItalicFont={KaiTi_GB2312}]{SimSun}
    \setCJKmonofont{KaiTi_GB2312} % Pluto use LiSu Thu use Kaiti, orig is SimSun
    \setCJKfamilyfont{fs}{FangSong_GB2312}
    \setCJKfamilyfont{kai}{KaiTi_GB2312}
  \fi
  \setCJKsansfont{SimHei}
  \setCJKfamilyfont{song}{SimSun}
  \setCJKfamilyfont{hei}{SimHei}
  \setCJKfamilyfont{li}{LiSu}
  \setCJKfamilyfont{you}{YouYuan}
}
\newcommand\installOTF{%
  \setmainfont{Times New Roman} % could be changed to "Times New Roman PS Std"
  \setsansfont{Arial}
  \setmonofont{Courier New}
  \setCJKmainfont[BoldFont={Adobe Heiti Std},ItalicFont={Adobe Kaiti Std}]{Adobe Song Std}
  \setCJKsansfont{Adobe Heiti Std}
  \setCJKmonofont{Adobe Kaiti Std}
  \setCJKfamilyfont{song}{Adobe Song Std}
  \setCJKfamilyfont{hei}{Adobe Heiti Std}
  \setCJKfamilyfont{fs}{Adobe Fangsong Std}
  \setCJKfamilyfont{kai}{Adobe Kaiti Std}
  \setCJKfamilyfont{li}{Adobe Kaiti Std}
  \setCJKfamilyfont{you}{Adobe Kaiti Std}
}

\ifisttf
  \installTTF
\else
  \installOTF
\fi
\newcommand{\song}{\CJKfamily{song}}    % 宋体
\newcommand{\fs}{\CJKfamily{fs}}        % 仿宋体
\newcommand{\kai}{\CJKfamily{kai}}      % 楷体
\newcommand{\hei}{\CJKfamily{hei}}      % 黑体
\newcommand{\li}{\CJKfamily{li}}        % 隶书
\newcommand{\you}{\CJKfamily{you}}      % 幼圆
\def\songti{\song}
\def\fangsong{\fs}
\def\kaishu{\kai}
\def\heiti{\hei}
\def\lishu{\li}
\def\youyuan{\you}
\newlength\thu@linespace
\newcommand{\thu@choosefont}[2]{%
    \setlength{\thu@linespace}{#2*\real{#1}}%
    \fontsize{#2}{\thu@linespace}\selectfont}
\def\thu@define@fontsize#1#2{%
    \expandafter\newcommand\csname #1\endcsname[1][\baselinestretch]{%
    \thu@choosefont{##1}{#2}}}
\thu@define@fontsize{chuhao}{42bp}
\thu@define@fontsize{xiaochu}{36bp}
\thu@define@fontsize{yihao}{26bp}
\thu@define@fontsize{xiaoyi}{24bp}
\thu@define@fontsize{erhao}{22bp}
\thu@define@fontsize{xiaoer}{18bp}
\thu@define@fontsize{sanhao}{16bp}
\thu@define@fontsize{xiaosan}{15bp}
\thu@define@fontsize{sihao}{14bp}
\thu@define@fontsize{banxiaosi}{13bp}
\thu@define@fontsize{xiaosi}{12bp}
\thu@define@fontsize{dawu}{11bp}
\thu@define@fontsize{wuhao}{10.5bp}
\thu@define@fontsize{xiaowu}{9bp}
\thu@define@fontsize{liuhao}{7.5bp}
\thu@define@fontsize{xiaoliu}{6.5bp}
\thu@define@fontsize{qihao}{5.5bp}
\thu@define@fontsize{bahao}{5bp}
\newcommand{\upcite}[1]{\textsuperscript{\cite{#1}}} % 上标形式引用
\newcommand{\china}{中华人民共和国}
\def\thuthesis{\textsc{Thu}-\textsc{Thesis}}
\def\nudtpaper{\textsc{Nudt}\textsc{Paper}}
\def\scnuthesis{\textsc{SCNU}\textsc{Thesis}}
\newcommand{\pozhehao}{\kern0.3ex\rule[0.8ex]{2em}{0.1ex}\kern0.3ex}
\newcommand{\chapterlabel}{}
\renewcommand\contentsname{\hei 目\hspace{1em}录}
\renewcommand\listfigurename{\hei 图\hspace{1em}目\hspace{1em}录}
\renewcommand\listtablename{\hei 表\hspace{1em}目\hspace{1em}录}
\newcommand\denotationname{\hei 符号列表}
\newcommand\ackname{致\hspace{1em}谢}
\newcommand\resumename{作者攻读学位期间发表的学术论文目录}
\newcommand\listequationname{公式索引}
\newcommand\equationname{公式}
\renewcommand\bibname{参考文献}
\renewcommand\indexname{索引}
\renewcommand\figurename{图}
\renewcommand\tablename{表}
\renewcommand\appendixname{附录}
\def\CJK@today{\the\year 年 \the\month 月 \the\day 日}
\newcommand{\setzhdate}[3]{
  #1 年 #2 月 #3 日}
\newcommand\entoday{\today{}}
\newcommand{\setZHCoverdate}[2]{
  \zhdigits{#1} 年 \zhdigits{#2} 月
}
\newcommand{\monthnameenglish}[1]{\MakeUppercase{\ifcase#1\or January\or February\or March\or April\or May\or June\or July\or August\or September\or October\or November\or December\fi}}
\newcommand{\setENCoverdate}[2]{
  \monthnameenglish{#2} #1
}
\geometry{top=21mm,bottom=25.5mm,left=30mm,right=30mm}
\geometry{headheight=9mm,headsep=1mm,footskip=10mm}
 \renewcommand\setheadrule[1]{%
    \ifdim#1=\z@
       \let\makeheadrule\@empty
    \else
       \def\makeheadrule{%
       \makebox[0pt][l]{\rule[.2\baselineskip]{\linewidth}{1.5pt}}%
       }%
    \fi
  }

\renewcommand{\chaptermark}[1]{\markboth{\chaptertitlename~\ #1}{}}

\renewpagestyle{plain}{
\sethead{}{}{} % 2024 规范中摘要去不显示页眉
\setfoot{}{{\songti \wuhao 第~\thepage~页}}{}%
}

\newpagestyle{mpage}{
  \sethead{}{\raisebox{.65\baselineskip}
    {
      \songti \wuhao
      \ifischapter % 标题作为页眉
        \ifistwoside
        {
          \ifodd \value{page} % 奇数页
          {第\thechapter 章\hspace{1em}\chaptertitle}
          \else % 偶数页
          {\@displaytitle}\fi
        }
        \else
        {第\thechapter 章\hspace{1em}\chaptertitle}\fi
        \else %标题不作为页眉
        {
          \ifodd \value{page} % 奇数页
          {\@title} % 奇数页论文题目作为页眉
          \else % 偶数页
          {\@displaytitle}\fi % 偶数页displaytitle作为页眉
        }\fi
    }
  }{}
  \headrule%
  \setfoot{}{{\songti \wuhao 第~\thepage~页}}{}%
  \footrule%
  \setfootrule{1bp}
}

\newpagestyle{appendixpage}{
\sethead{}{}{} % 2024 规范中附录页不显示页眉
\setfoot{}{{\songti \wuhao 第~\thepage~页}}{}%
}

\newpagestyle{emptypage}{
\sethead{}{}{}
\setfoot{}{{\songti \wuhao 第~\thepage~页}}{}%
}

\renewcommand\frontmatter{%
    \clearpage
    \@mainmatterfalse
    \pagenumbering{Roman}
    \pagestyle{plain}
}

\renewcommand\mainmatter{%
    \if@openright\cleardoublepage\else\clearpage\fi
    \@mainmattertrue

    \pagenumbering{arabic}
    \normalsize % normal, 正文开始
    \def\@tabular{\wuhao[1.25]\old@tabular} % 之后表格字体使用5号

    \pagestyle{mpage}
  }
\renewcommand\backmatter{%
    \if@openright\cleardoublepage\else\clearpage\fi
    \titleformat{\chapter}{\filcenter \heiti \sanhao}{附录\,\thechapter\,}{1em}{}
    \titlecontents{chapter}[0pt]{\vspace{0.25\baselineskip} \heiti \xiaosi[1.25]}
      {附录\,\thecontentslabel\quad}{}
      {\hspace{.5em}\titlerule*{.}\contentspage}
      \@mainmattertrue
    \pagestyle{appendixpage}
  }
\renewcommand\cleardoublepage{\clearpage\if@openright \ifodd\c@page
  \else
  \newpage{}
  \thispagestyle{empty}
  \vspace*{\fill}
  \begin{center}
  \end{center}
  \vspace*{\fill}
  \clearpage\fi\fi%
}
%%
\newcommand\cabstractname{摘\hspace{1em}要}
\newcommand\ckeywordsname{\hspace{-2em}{\heiti \xiaosi 关键词：}}
\newcommand\ckeywords[1]{{\xiaosi \songti \ckeywordsname #1}}

\newcommand\eabstractname{ABSTRACT}
\newcommand\ekeywordsname{\hspace{-2em}{\xiaosi \textsf{Keywords:}}}
\newcommand\ekeywords[1]{{\xiaosi \ekeywordsname~#1}}
\newenvironment{cabstract}{%
  \clearpage
  \addcontentsline{toc}{chapter}{\cabstractname}%
  ~
  \begin{spacing}{2.0}
    \begin{center}{\hei \fontsize{18pt}{18pt} \cabstractname}\end{center}%
  \end{spacing}
  \xiaosi \vspace{1.4pt}%
  % \@afterheading
}
{\par\vspace{2em}\par}

\newenvironment{eabstract}{%
  \clearpage
  \addcontentsline{toc}{chapter}{\eabstractname}%
  ~
  \begin{spacing}{2.0}
    \begin{center}{\sanhao \textsf{\eabstractname}}\end{center}%
  \end{spacing}
  \xiaosi \vspace{1.4pt}

  % \@afterheading
}
{\par\vspace{2em}\par}
\titlecontents{chapter}[0pt]{\vspace{0.25\baselineskip} \heiti \xiaosi[1.25]}
    {第\CJKnumber{\thecontentslabel}章\quad}{}
    {\hspace{.5em}\titlerule*{.}\contentspage}
\titlecontents{section}[2em]{\songti \xiaosi[1.25]}
    {\thecontentslabel\quad}{}
    {\hspace{.5em}\titlerule*{.}\contentspage}
\titlecontents{subsection}[4em]{\songti \xiaosi[1.25]}
    {\thecontentslabel\quad}{}
    {\hspace{.5em}\titlerule*{.}\contentspage}
\titlecontents{figure}[0pt]{\songti \xiaosi[1.25]}
    {\makebox[3.5em][l]{图~\thecontentslabel\quad}}{}
    {\hspace{.5em}\titlerule*{.}\contentspage}
\titlecontents{table}[0pt]{\songti \xiaosi[1.25]}
    {\makebox[3.5em][l]{表~\thecontentslabel\quad}}{}
    {\hspace{.5em}\titlerule*{.}\contentspage}
\renewcommand\chapter{\if@openright\cleardoublepage\else\clearpage\fi
                    \global\@topnum\z@
                    \@afterindentfalse
                    \secdef\scnu@chapter\@schapter}
\def\scnu@chapter[#1]#2{
  \ifnum \c@secnumdepth >\m@ne
    \if@openright\cleardoublepage\else\clearpage\fi
    \phantomsection
    \if@mainmatter
      \refstepcounter{chapter}%
      \addcontentsline{toc}{chapter}%
        {\protect\numberline{\thechapter}#1}%
    \else
      \addcontentsline{toc}{chapter}{#1}%
    \fi
  \else
    \addcontentsline{toc}{chapter}{#1}%
  \fi
  \chaptermark{#1}%
  \if@twocolumn
    \@topnewpage[\@makechapterhead{#2}]%
  \else
    \@makechapterhead{#2}%
    \@afterheading
  \fi
}
\newcommand{\sectionbreak}{%
\addpenalty{-300}%
\vspace*{0pt}%
}
\setlength{\topskip}{0pt}
\setcounter{secnumdepth}{3}
\titleformat{\chapter}{\filcenter \songti \bfseries \sanhao[1.25]}{第\CJKnumber{\thechapter}章\,}{1em}{}
\titleformat{\section}{\songti \bfseries\xiaosan[1.25]}{\thesection}{1em}{}
\titleformat{\subsection}{\songti \bfseries\sihao[1.25]}{\thesubsection}{1em}{}
\titleformat{\subsubsection}{\songti \bfseries\xiaosi[1.25]}{\thesubsubsection}{1em}{}
\titlespacing{\chapter}{0pt}{2.4ex-\topskip-\heightof{A}}{2.4ex}
\titlespacing{\section}{0pt}{2ex-\heightof{a}}{2ex}
\titlespacing{\subsection}{0em}{2ex}{2ex}
\titlespacing{\subsubsection}{0em}{1ex}{0ex}
\renewcommand\normalsize{%
  \xiaosi%
  \renewcommand{\baselinestretch}{1.4}%
\setlength\abovedisplayskip{10bp \@plus 2bp \@minus 2bp}%
\setlength\abovedisplayshortskip{10bp \@plus 2bp \@minus 2bp}%
\setlength\belowdisplayskip{\abovedisplayskip}%
\setlength\belowdisplayshortskip{\abovedisplayshortskip}%
}
\setlength{\parindent}{2.5em}
\setlength{\parskip}{0bp \@plus .5bp \@minus .5bp}
\newcommand*{\ziju}[1]{\renewcommand{\CJKglue}{\hskip #1}}
\renewenvironment{thebibliography}[1]{%

  \thispagestyle{emptypage}
  \chapter*{\bibname}%

  \addcontentsline{toc}{chapter}{\bibname}

  \list{\@biblabel{\@arabic\c@enumiv}}%
  {\renewcommand{\makelabel}[1]{##1\hfill}
    \settowidth\labelwidth{1.1cm}
    \setlength{\labelsep}{0.4em}
    \setlength{\itemindent}{0pt}
    \setlength{\leftmargin}{\labelwidth+\labelsep}
    \addtolength{\itemsep}{-0.7em}
    \usecounter{enumiv}%
    \let\p@enumiv\@empty
    \renewcommand\theenumiv{\@arabic\c@enumiv}}%
  \sloppy\frenchspacing
  \clubpenalty4000%
  \@clubpenalty \clubpenalty
  \widowpenalty4000%
  \interlinepenalty4000%
  \sfcode`\.\@m
}
{\def\@noitemerr
  {\@latex@warning{Empty `thebibliography' environment}}%
  \endlist\frenchspacing}

\setlength{\floatsep}{12bp \@plus 2bp \@minus 1bp}
\setlength{\intextsep}{12bp \@plus 2bp \@minus 1bp}
\setlength{\textfloatsep}{12bp \@plus 2bp \@minus 1bp}
\setlength{\@fptop}{0bp \@plus1.0fil}
\setlength{\@fpsep}{12bp \@plus2.0fil}
\setlength{\@fpbot}{0bp \@plus1.0fil}
\renewcommand{\textfraction}{0.15}
\renewcommand{\topfraction}{0.85}
\renewcommand{\bottomfraction}{0.65}
\renewcommand{\floatpagefraction}{0.80}
\let\old@tabular\@tabular
\def\thu@tabular{\wuhao[1.25]\old@tabular}
\DeclareCaptionLabelFormat{thu}{{\wuhao[1.25]\song #1~\rmfamily #2}}
\DeclareCaptionLabelSeparator{thu}{\hspace{1em}}
\DeclareCaptionFont{thu}{\wuhao[1.25]}
\captionsetup{labelformat=thu,labelsep=thu,font=thu}
\captionsetup[table]{position=top,belowskip={12bp-\intextsep},aboveskip=6bp}
\captionsetup[figure]{position=bottom,belowskip={9bp-\intextsep},aboveskip=6bp}
\captionsetup[subfloat]
{labelformat=simple,font=thu,captionskip=6bp,nearskip=6bp,farskip=0bp,topadjust=0bp}
\renewcommand{\thesubfigure}{(\alph{subfigure})}
\renewcommand{\thesubtable}{(\alph{subtable})}
\let\thu@LT@array\LT@array
\def\LT@array{\thu@LT@array}
\newenvironment{denotation}[1][3cm]{
  \thispagestyle{emptypage}
  \chapter*{\denotationname} % no tocline
  \addcontentsline{toc}{chapter}{\denotationname}%
  \noindent\begin{list}{}%
    {\vskip-30bp\xiaosi[1.6]
      \renewcommand\makelabel[1]{##1\hfil}
      \setlength{\labelwidth}{#1} % 标签盒子宽度
      \setlength{\labelsep}{1cm} % 标签与列表文本距离
      \setlength{\itemindent}{0cm} % 标签缩进量
      \setlength{\leftmargin}{\labelwidth+\labelsep} % 左边界
      \setlength{\rightmargin}{0cm}
      \setlength{\parsep}{0cm} % 段落间距
      \setlength{\itemsep}{0cm} % 标签间距
      \setlength{\listparindent}{0cm} % 段落缩进量
      \setlength{\topsep}{0pt} % 标签与上文的间距
    }
  }{\end{list}}
\newenvironment{ack}{%
  \thispagestyle{emptypage}
  \chapter*{\ackname}%
  \addcontentsline{toc}{chapter}{\ackname}%
  \ifisanon\color{white}\else\relax\fi%
  \xiaosi%
  \@mainmatterfalse
  \@afterheading
}
{\par\vspace{2em}\par}
\newenvironment{resume}{%
  \thispagestyle{emptypage}
  \chapter*{\resumename}
  \addcontentsline{toc}{chapter}{\resumename}
  % \ifisanon\color{white}\else\relax\fi%
  \xiaosi
  \@mainmatterfalse
  \@afterheading
}
{\par\vspace{2em}\par}
\renewtheoremstyle{nonumberplain}%
{\item[\hspace*{2em} \theorem@headerfont ##1\ \theorem@separator]}%
{\item[\hspace*{2em} \theorem@headerfont ##1\ (##3)\theorem@separator]}
\theoremstyle{nonumberplain}
\theorembodyfont{\rmfamily}
\theoremheaderfont{\sffamily}
\theoremsymbol{\ensuremath{\blacksquare}}
\theoremseparator{:\,}
\newtheorem{proof}{证明}[chapter]
\newtheorem{assumption}{假设}[chapter]
\newtheorem{definition}{定义}[chapter]

\renewtheoremstyle{plain}%
{\item[\hspace*{2em} \theorem@headerfont ##1\ ##2\theorem@separator]}%
{\item[\hspace*{2em} \theorem@headerfont ##1\ ##2\ (##3)\theorem@separator]}
\theoremstyle{plain}
\theorembodyfont{\kai}
\theoremheaderfont{\hei}
\theoremsymbol{}
\newtheorem{lemma}{引理}[chapter]
\newtheorem{theorem}{定理}[chapter]
\newtheorem{axiom}{公理}[chapter]
\newtheorem{corollary}{推论}[chapter]
\newtheorem{conjecture}{猜想}[chapter]
\newtheorem{proposition}{命题}[chapter]
\newtheorem{exercise}{练习}[section]
\newtheorem{example}{例}[section]
\newtheorem{problem}{问题}[section]
\newtheorem{remark}{注释}[section]
\renewenvironment{split}{%
  \if@display%
    \ifinner%
      \@xp\@xp\@xp\split@aligned%
    \else%
      \ifst@rred \else \global\@eqnswtrue \fi%
    \fi%
  \fi%
  \collect@body\gather@split%
}{%
  \crcr%
  \egroup%
  \egroup%
  \iftagsleft@ \@xp\lendsplit@ \else \@xp\rendsplit@ \fi%
}
\def\classification#1{\def\@classification{#1}} % 中图分类号
\def\serialno#1{\def\@serialno{#1}} % 学号
\def\udc#1{\def\@udc{#1}} % UDC号
\def\mastertype#1{\def\@mastertype{#1}} % 硕士学位类型
\def\confidentiality#1{\def\@confidentiality{#1}} % 密级
\def\title#1{\def\@title{#1}} % 中文题目
\def\displaytitle#1{\def\@displaytitle{#1}} % 文章标题
\def\entitle#1{\def\@entitle{#1}} % 英文标题
\def\author#1{\def\@author{#1}} % 中文作者名
\def\enauthor#1{\def\@enauthor{#1}} % 英文作者名
\def\zhdate#1{\def\@zhdate{#1}} % 中文日期
\def\ZHCoverdate#1{\def\@ZHCoverdate{#1}} % 非繁体大写中文日期
\def\ENCoverdate#1{\def\@ENCoverdate{#1}} % MONTH, year
\def\subject#1{\def\@subject{#1}} % 中文学科
\def\ensubject#1{\def\@ensubject{#1}} % 英文学科
\def\researchfield#1{\def\@researchfield{#1}} % 中文研究方向
\def\enresearchfield#1{\def\@enresearchfield{#1}} % 英文研究方向
\def\supervisor#1{\def\@supervisor{#1}} % 导师
\def\ensupervisor#1{\def\@ensupervisor{#1}} % 导师英文名
\def\protitle#1{\def\@protitle{#1}} % 导师的职称
\def\school#1{\def\@school{#1}} % 学院
\def\enschool#1{\def\@enschool{#1}} % 学院英文名
\def\stutype#1{\def\@stutype{#1}} % 学生类型：大陆、港澳台、留学生

\def\optionpaperclass#1{\def\@optionpaperclass{#1}} % paperclass
\def\optionpaperclassen#1{\def\@optionpaperclassen{#1}} % paperclass english
\def\optionas#1{\def\@optionas{#1}} % Advisor OR Supervisor

\def\CommitteeMemberA#1#2#3#4{
  \def\@CommitteeTableRowA{#1 & #2 & #3 & #4}
} % 答辩委员会成员A
\def\CommitteeMemberB#1#2#3#4{
  \def\@CommitteeTableRowB{#1 & #2 & #3 & #4}
} % 答辩委员会成员B
\def\CommitteeMemberC#1#2#3#4{
  \def\@CommitteeTableRowC{#1 & #2 & #3 & #4}
} % 答辩委员会成员C
\def\CommitteeMemberD#1#2#3#4{
  \def\@CommitteeTableRowD{#1 & #2 & #3 & #4}
} % 答辩委员会成员D
\def\CommitteeMemberE#1#2#3#4{
  \def\@CommitteeTableRowE{#1 & #2 & #3 & #4}
} % 答辩委员会成员E
\def\CommitteeMemberF#1#2#3#4{
  \def\@CommitteeTableRowF{#1 & #2 & #3 & #4}
} % 答辩委员会成员F
\def\CommitteeMemberG#1#2#3#4{
  \def\@CommitteeTableRowG{#1 & #2 & #3 & #4}
} % 答辩委员会成员G
\def\CommitteeMemberH#1#2#3#4{
  \def\@CommitteeTableRowH{#1 & #2 & #3 & #4}
} % 答辩委员会成员H
\ifismaster
  \optionpaperclass{硕士}
  \optionpaperclassen{Master}
  \optionas{Advisor}
\else
  \optionpaperclass{博士}
  \optionpaperclassen{Doctor}
  \optionas{Supervisor}
\fi
\def\normalstustr{大陆}
\def\hktwstustr{港澳台}
\def\abroadstustr{留学生}
\def\makeCover{%
\clearpage{
\thispagestyle{empty}
  \renewcommand{\baselinestretch}{1.3}%
  \def\entry##1##2##3{%
    \multicolumn{##1}{l}{\uline{\hbox to ##2{\hfil##3\hfil}}}
    }
  \null
  \ifisanon%
  \author{}%
  \enauthor{}%
  \supervisor{}%
  \ensupervisor{}%
  \protitle{}%
  \else\relax\fi%
  \pagenumbering{alph}% not display, for print only

  \begin{tikzpicture}[remember picture, overlay]
    \node[anchor=north west, align=left]
      at ([xshift=125pt, yshift=-72pt]current page.north west) {
        分类号：\@classification
      };
    \node[anchor=north west, align=left]
      at ([xshift=360pt, yshift=-72pt]current page.north west) {
        密级：\@confidentiality
      };
      \node[anchor=north west, align=left]
      at ([xshift=125pt, yshift=-94pt]current page.north west) {
        UDC：\@udc
      };
    \node[anchor=north west, align=left]
      at ([xshift=360pt, yshift=-94pt]current page.north west) {
        学号：\@serialno
      };
    \node[anchor=north, align=center, text width=\dimexpr\textwidth-0pt\relax]
      at ([xshift=-11pt,yshift=-156pt]current page.north) {
        \includegraphics[width=264pt]{title.png}
      };
    \node[anchor=north, align=center, text width=\dimexpr\textwidth-0pt\relax]
      at ([yshift=-232pt]current page.north) {
        \fontsize{16pt}{16pt}\selectfont\bfseries\itshape
        South China Normal University
      };
    \node[anchor=north]
      at ([yshift=-278pt]current page.north) {
        \songti\fontsize{36pt}{36pt}\selectfont\bfseries
        \ifismaster{硕士}\else{博士}\fi 学位论文
      };
    \node[anchor=north, align=left]
      at ([yshift=-321pt]current page.north) {
        \songti\fontsize{18pt}{18pt}\selectfont\bfseries
        （\@mastertype 学位
        \ifx\@stutype\hktwstustr
          \hspace*{9pt}港澳台生
        \fi
        \ifx\@stutype\abroadstustr
          \hspace*{9pt}留学生
        \fi
        ）
      };
    \node[anchor=north west, align=center, text width=\dimexpr\textwidth-0pt\relax]
      at ([xshift=82pt, yshift=-370pt]current page.north west) {

          \begin{spacing}{1.4}
          \heiti\fontsize{22pt}{30pt}\selectfont\centering
          \@title
          \end{spacing}

      };
      \node[anchor=north west]
      at ([xshift=82pt, yshift=-419pt]current page.north west) {

          \rule{430pt}{1pt}

      };
      \node[anchor=north west]
      at ([xshift=82pt, yshift=-462pt]current page.north west) {

          \rule{430pt}{1pt}

      };
    \node[anchor=north, ]
      at ([yshift=-527pt]current page.north) {
        \songti\fontsize{14pt}{14pt}\selectfont
        \begin{tabular}{
          >{\rule{0pt}{31pt}}p{127pt}
          >{\centering\arraybackslash\rule{0pt}{31pt}}m{192pt}
        }
        \makebox[125pt][s]{\fontsize{16pt}{16pt}\bfseries 学位申请人：} & \entry{1}{190pt}{\@author} \\
        \makebox[125pt][s]{\fontsize{16pt}{16pt}\bfseries 学科专业：} & \entry{1}{190pt}{\@subject} \\
        \makebox[125pt][s]{\fontsize{16pt}{16pt}\bfseries 论文研究方向：} & \entry{1}{190pt}{\@researchfield} \\
        \makebox[125pt][s]{\fontsize{16pt}{16pt}\bfseries 所在学院：} & \entry{1}{190pt}{\@school} \\
        \makebox[125pt][s]{\fontsize{16pt}{16pt}\bfseries 导师姓名及职称：} & \entry{1}{190pt}{\@supervisor \hspace*{14pt} \@protitle} \\
        \end{tabular}
      };
    \node[anchor=north, align=left]
      at ([yshift=-758pt]current page.north) {
        \songti\fontsize{14pt}{14pt}\selectfont
        \@ZHCoverdate
      };
  \end{tikzpicture}
  \cleardoublepage}
}
\def\makeEnCover{
  \clearpage{
  \thispagestyle{empty}
  \renewcommand{\baselinestretch}{1.3}%
  \def\entry##1##2##3{%
    \multicolumn{##1}{l}{\uline{\hbox to ##2{\hfil##3\hfil}}}
    }
  \null
  \ifisanon%
  \author{}%
  \enauthor{}%
  \supervisor{}%
  \ensupervisor{}%
  \protitle{}%
  \else\relax\fi%
  \begin{tikzpicture}[remember picture, overlay]
    \node[anchor=north]
      at ([yshift=-131pt]current page.north) {
        \fontsize{22pt}{22pt}\selectfont\bfseries
        South China Normal University
      };
    \node[anchor=north]
      at ([yshift=-200pt]current page.north) {
        \fontsize{18pt}{18pt}\selectfont\bfseries
        A \ifismaster{Thesis }\else{Dissertation }\fi Submitted for the Degree of \ifismaster{Master}\else{Doctor}\fi
      };
    \node[anchor=north west, align=center, text width=\dimexpr\textwidth-0pt\relax]
      at ([xshift=82pt, yshift=-283pt]current page.north west) {

        \begin{spacing}{1.4}
          \fontsize{22pt}{31pt}\selectfont\centering\bfseries
            \@entitle
        \end{spacing}

      };
    \node[anchor=north west]
      at ([xshift=82pt, yshift=-333pt]current page.north west) {

          \rule{430pt}{1pt}

      };
    \node[anchor=north west]
      at ([xshift=82pt, yshift=-377pt]current page.north west) {

          \rule{430pt}{1pt}

      };
    \node[anchor=north, ]
      at ([yshift=-420pt]current page.north) {
        \fontsize{14pt}{14pt}\selectfont
        \begin{tabular}{
          >{\rule{0pt}{31pt}}p{150pt}
          >{\centering\arraybackslash\rule{0pt}{31pt}}m{212pt}
        }
        {\fontsize{16pt}{16pt}\bfseries Supervisor:} & \entry{1}{200pt}{\@ensupervisor} \\
        {\fontsize{16pt}{16pt}\bfseries Candidate:} & \entry{1}{200pt}{\@enauthor} \\
        {\fontsize{16pt}{16pt}\bfseries Major:} & \entry{1}{200pt}{\@ensubject} \\
        {\fontsize{16pt}{16pt}\bfseries Research direction:} & \entry{1}{200pt}{\@enresearchfield} \\
        {\fontsize{16pt}{16pt}\bfseries Department/School:} & \entry{1}{200pt}{\@enschool} \\
        \end{tabular}
      };
    \node[anchor=north]
      at ([yshift=-655pt]current page.north) {
        \fontsize{16pt}{16pt}\selectfont\bfseries
        \@ENCoverdate
      };
  \end{tikzpicture}
  \cleardoublepage}
}

\def\makecert{%
  \clearpage{
  \thispagestyle{empty}
  \begin{tikzpicture}[remember picture, overlay]
    % Draw the rectangle with specified margins and border
    \draw[line width=0.5pt]
        ([xshift=5.53em, yshift=-5.12em]current page.north west)
        rectangle
        ([xshift=-5.53em, yshift=5.12em]current page.south east);
    % Add text inside the rectangle
    \node[anchor=north, align=center, text width=\dimexpr\textwidth-9.24em\relax]
        at ([yshift=-5.12em-49.5pt]current page.north) {
        \CJKfamily{song}\fontsize{16pt}{16pt}\selectfont\bfseries
        华南师范大学研究生学位论文答辩合格证明
    };
    % Add the paragraph text inside the rectangle
    \node[anchor=north west, align=left, text width=\dimexpr\textwidth-0pt\relax]
        at ([xshift=5.53em+16pt, yshift=-5.12em-49.5pt-38.5pt-16pt]current page.north west) {
        \CJKfamily{song}\fontsize{16pt}{16pt}\selectfont
        \hspace*{32pt}学位申请人\underline{\@author}向本学位论文答辩委员会提交题为\underline{\@title}的
        \ifismaster{硕士}\else{博士}\fi
        论文，经答辩委员会审议，本论文答辩合格，特此证明。
    };
    % Add committee members title
    \node[anchor=north, align=center, text width=\dimexpr\textwidth-0pt\relax]
        at ([yshift=-5.12em-49.5pt-38.5pt-32pt-93.5pt]current page.north) {
        \CJKfamily{hei}\fontsize{16pt}{16pt}\selectfont\bfseries
        \@author \ifismaster{硕士}\else{博士}\fi 学位论文答辩委员会成员名单
    };
    % Add the table
    \node[anchor=north, align=center, text width=\dimexpr\textwidth-0pt\relax]
        at ([yshift=-5.12em-49.5pt-38.5pt-32pt-93.5pt-48pt]current page.north) {
        \begin{tikzpicture}
          \node[inner sep=0pt] (table) {
            \CJKfamily{song}\fontsize{12pt}{12pt}\selectfont\centering
            \begin{tabular}{
              |>{\centering\arraybackslash\rule{0pt}{22pt}}m{65pt}|
              >{\centering\arraybackslash\rule{0pt}{22pt}}m{65pt}|
              >{\centering\arraybackslash\rule{0pt}{22pt}}m{110pt}|
              >{\centering\arraybackslash\rule{0pt}{22pt}}m{65pt}|
            }

              \hline
                {\rule{0pt}{22pt}姓名} &
                {\rule{0pt}{22pt}职称} &
                {\rule{0pt}{22pt}单位} &
                {\rule{0pt}{22pt}备注} \\
              \hline
              \@CommitteeTableRowA \\ \hline
              \@CommitteeTableRowB \\ \hline
              \@CommitteeTableRowC \\ \hline
              \@CommitteeTableRowD \\ \hline
              \@CommitteeTableRowE \\ \hline
              \@CommitteeTableRowF \\ \hline
              \@CommitteeTableRowG \\ \hline
              \@CommitteeTableRowH \\ \hline
            \end{tabular}
          };
        \end{tikzpicture}
    };
    \node[anchor=north west, align=left, text width=\dimexpr\textwidth-0pt\relax]
        at ([xshift=5.53em+48pt, yshift=-5.12em-49.5pt-38.5pt-32pt-93.5pt-340pt]current page.north west) {
        \CJKfamily{song}\fontsize{15pt}{15pt}\selectfont
        论文指导老师：\underline{\@supervisor}
    };
    \node[anchor=north east, align=right]
        at ([xshift=-5.53em, yshift=-5.12em-49.5pt-38.5pt-32pt-93.5pt-340pt-64pt]current page.north east) {
        \CJKfamily{song}\fontsize{14pt}{14pt}\selectfont
        华南师范大学 \CJKfamily{song}\fontsize{16pt}{16pt}\selectfont\hspace*{2pt}\@school（公章）
    };
    \node[anchor=north east, align=right]
        at ([xshift=-5.53em-48pt, yshift=-5.12em-49.5pt-38.5pt-32pt-93.5pt-340pt-64pt-15pt-15pt]current page.north east) {
        \CJKfamily{song}\fontsize{15pt}{15pt}\selectfont
        \@zhdate
    };
  \end{tikzpicture}
  \cleardoublepage}
}
\def\MemberToTable#1{
  \def\temp##1,##2,##3,##4{##1 & ##2 & ##3 & ##4 \\ \hline}
  \temp#1
}
\endinput
%%
%% End of file `scnuthesis.cls'.
